package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.PostConstruct;
@Controller // 当前类为控制器
@ResponseBody // 返回的是数据，而非页面
public class User3 {
    @Value("${str1}")
    private String str1;

    @Value("${str2}")
    private String str2;

    @Value("${str3}")
    private String str3;


//@PostConstruct
//public void postConstruct() {
////    System.out.println("string.str1：" + str1);
////    System.out.println("string.str2：" + str2);
////    System.out.println("string.str3：" + str3);
//
//}
@Autowired
private Student student;
    @PostConstruct
    public void postConstruct() {
        //System.out.println(student);
    }
}
